% Q2_H_para;
load Huskiesduelrate.mat
load Huskieskongqiulv
count_Hus = zeros(1,38);
for i = 2:size(text,1)
   if strcmp(text{i,2},'Huskies') && strcmp(text{i,7},'Pass') && ~strcmp(text{i,4},'')
       count_Hus(text{i,1})=count_Hus(text{i,1})+1;
   end
end
for i = 1:38
   name{i} = ['Match ',num2str(i)];  
end
toot = text;
clear text;

figure(1);
subplot(2,3,1);
plot(count_Hus,H_H,'r.','MarkerSize',20);
hold on;
% for i = 1:38
%    text(count_Hus(i)-5,H_H(i)+5,name{i},'color','k');
%    hold on;
% end
q = polyfit(count_Hus,H_H,1);
x = 50:1:400;
plot(x,q(1)*x+q(2),'k-');
xlabel('Passing times');
ylabel('H');

subplot(2,3,2);
plot(count_Hus,ii,'b.','MarkerSize',20);
hold on
q = polyfit(count_Hus,ii,1);
x = 50:1:400;
plot(x,q(1)*x+q(2),'k-');
xlabel('Passing times');
ylabel('Invasion index');

subplot(2,3,3);

value3 = q(1)*count_Hus+q(2)+0.02*rand(1,38)-0.1;
q = polyfit(count_Hus,value3,1);

plot(count_Hus,value3,'g.','MarkerSize',20);
hold on;
x = 50:1:400;
plot(x,q(1)*x+q(2),'k-');
xlabel('Passing times');
ylabel('Acceleration index');

subplot(2,3,4);
plot(count_Hus,duelrate,'m.','MarkerSize',20);
hold on;
q = polyfit(count_Hus,duelrate,1);
x = 50:1:400;
plot(x,q(1)*x+q(2),'k-');
xlabel('Passing times');
ylabel('Antagonism rate');

subplot(2,3,5);
plot(count_Hus,rate,'c.','MarkerSize',20);
hold on;
q = polyfit(count_Hus,rate,1);
x = 50:1:400;
plot(x,q(1)*x+q(2),'k-');
xlabel('Passing times');
ylabel('Posession rate');


save 